package com.cq.hd.task.web.job;

import com.cq.hd.product.api.TbActiveBrowseApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ActiveBrowseTask  {

    @Autowired
    private TbActiveBrowseApi activeBrowseApi;

    // 每天凌晨0点30分执行一次    0 30 0 * * ?
    @XxlJob("removeActiveBrowse")
    public void execute() {
        log.info("清空近2个月浏览记录=====>开始");
        activeBrowseApi.removeActiveBrowseJob();
        log.info("清空近2个月浏览记录=====>结束");
    }
}
